<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
  <head>
    <meta charset="utf-8" />
    <meta name="generator" content="pandoc" />
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, user-scalable=yes"
    />
    <title>readme</title>
    <style type="text/css">
      code {
        white-space: pre-wrap;
      }
      span.smallcaps {
        font-variant: small-caps;
      }
      span.underline {
        text-decoration: underline;
      }
      div.column {
        display: inline-block;
        vertical-align: top;
        width: 50%;
      }
    </style>
  </head>
  <body>
    <h1 id="practice-exercises-for-problem-solving">
      Practice Exercises for problem solving
    </h1>
    <h2 id="overview">Overview</h2>
    <p>
      In this section, you’ll have a chance to practice the concepts you’ve
      learned in the videos. First, review the core concepts covered that you’ll
      need to keep in mind. Then go through the exercises below.
    </p>
    <p>
      Remember, these are for your own benefit. Feel free to skip them if you
      don’t find a particular exercise valuable or you get stuck for too long.
    </p>
    <h2 id="core-concepts">Core concepts</h2>
    <h3 id="michaels-problem-solving-techniques">
      Michael’s problem solving techniques
    </h3>
    <p>
      Here are a few of the ideas I use to get traction while solving a problem
    </p>
    <ol type="1">
      <li>Divide and conquer.</li>
      <li>Have I seen a similar problem before?</li>
      <li>
        Visualize the data (<a href="http://pythontutor.com">pythontutor.com</a
        >, debugger, <code>print()</code>, etc)
      </li>
      <li>
        Run through the data structures (will a well known data structure help
        this problem?).
      </li>
      <li>
        Is there a <a href="https://pypi.org/">PyPI</a> package that solves
        this? Also check
        <a href="https://awesome-python.com/">awesome-python</a>.
      </li>
      <li>Remember this is <strong>part of the journey</strong>.</li>
      <li>
        <strong>Just start</strong>, you can adjust as you go and learn more.
      </li>
    </ol>
    <h2 id="exercises">Exercises</h2>
    <p>
      Now it’s your turn. For this round, you get to dive into a similar
      experience as we had building
      <a
        href="https://www.google.com/search?client=firefox-b-1-d&amp;q=Tic+Tac+Toe"
        ><strong>Tic Tac Toe</strong></a
      >
      in the videos.
    </p>
    <p><img src="readme_files/Connect_4_Board_and_Box.jpg" /></p>
    <p>
      You get to build a <strong>Connect 4</strong> clone. Read more about the
      game
      <strong
        ><a href="https://en.wikipedia.org/wiki/Connect_Four"
          >on Wikipedia</a
        ></strong
      >
      or try a few rounds over at
      <strong
        ><a href="https://www.mathsisfun.com/games/connect4.html"
          >this website</a
        ></strong
      >.
    </p>
    <p>
      It should be pretty similar to tic tac toe. But the way a player selects a
      play is just to choose the column and the state of the board determines
      which row the puck stops in. Also, you do not need an entire row, column,
      or diagonal to win, just 4 of a given kind in any of these.
    </p>
    <p>
      Think about what you saw in the videos (<strong
        >#2, have I seen a similar solution</strong
      >), use the right data structure (<strong
        >#4, Run through the data structures</strong
      >), and as always, break the problem down to simple parts (<strong
        >#1, Divide and conquer</strong
      >).
    </p>
    <p>
      Also, remember that writing this program is involved. Most likely, it
      won’t be super fast to solve (<strong
        >#6, this is part of the journey</strong
      >). Now, create a new blank project and start coding (<strong
        >#7, just start</strong
      >)!
    </p>
  </body>
</html>
